package com.md.service;

import com.md.entity.Blog;
import com.md.mapper.BlogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BlogServices implements BlogService{
    @Autowired
    private BlogMapper mapper;


    @Override
    public List<Blog> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public Blog selectById(int id) {
        return mapper.selectById(id);

    }

    @Override
    public List<Blog> selectName(String name) {
        return mapper.selectName(name);
    }

    @Override
    public int deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public int insertById(Blog blog) {
        return mapper.insertById(blog);
    }

    @Override
    public int updateById(Blog blog) {
        return mapper.updateById(blog);
    }
}
